<template>
  <div class="rescource-manager">
    <div class="resource-manager-title">
      <span>
        <House
          style="width: 1.2em; height: 1.2em; margin-top: 5px; margin-left: 8px"
        />
        资源管理器
      </span>
    </div>
    <resource-manager-tree @addNum="getNum" @click="clickme"/>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import ResourceManagerTree from './cpms/resource-manager-tree.vue'
import { House } from '@element-plus/icons-vue'

export default defineComponent({
  components: { ResourceManagerTree, House },
  setup() {
    return { House }
  }, data() {
            return {
                parentNum: 0
            }
        },
        methods:{
            // childNum是由子组件传入的
            getNum(childNum: number){
                this.parentNum = childNum
                 this.$emit('addNumApp',this.parentNum)
                  console.log("22222")
                  console.log(this.parentNum)
            },
            // clickme(id: any){
            //    this.$emit('addNumApp',this.parentNum)
            //   //  console.log(this.parentNum)
            // }

        }
})
</script>

<style scoped lang="less">
@import '../../assets/style/index';
.resource-manager-title {
  position: sticky;
  top: 0;
  z-index: 100;
  height: @main-row-height;
  line-height: @main-row-height;
  padding: 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rescource-manager {
  height: 100%;
  border-right: @border-style;
}
</style>
